package com.game.centerserver.infrastructure.entity;

import com.game.centerserver.pojo.result.ServerMasterView;

import java.io.Serializable;

/**
 * (ServerMasterInfo)实体类
 * 服务器的产品规格
 * @author makejava
 * @since 2024-11-14 22:33:46
 */
public class ServerMasterInfo implements Serializable {
    private static final long serialVersionUID = 850229525722824326L;
    /**
     * 公网IP
     */
    private String ip;
    
    private Integer port;
    /**
     * 内网IP
     */
    private String intranetIp;
    /**
     * CPU主频
     */
    private Float cpuFrequency;
    /**
     * CPU核心数
     */
    private Integer cpuCores;
    /**
     * 内存大小，单位是GB
     */
    private Integer memSize;
    /**
     * 上行带宽
     */
    private Float upstreamBandwidth;
    /**
     * 下行带宽
     */
    private Float downstreamBandwidth;

    public ServerMasterInfo() {
    }

    public ServerMasterInfo(ServerMasterView serverMasterView) {
        this.ip = serverMasterView.getIp();
        this.port = serverMasterView.getPort();
        this.intranetIp = serverMasterView.getIntranetIp();
        this.cpuFrequency = serverMasterView.getCpuFrequency();
        this.cpuCores = serverMasterView.getCpuCores();
        this.memSize = serverMasterView.getMemSize();
        this.upstreamBandwidth = serverMasterView.getUpstreamBandwidth();
        this.downstreamBandwidth = serverMasterView.getDownstreamBandwidth();
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public String getIntranetIp() {
        return intranetIp;
    }

    public void setIntranetIp(String intranetIp) {
        this.intranetIp = intranetIp;
    }

    public Float getCpuFrequency() {
        return cpuFrequency;
    }

    public void setCpuFrequency(Float cpuFrequency) {
        this.cpuFrequency = cpuFrequency;
    }

    public Integer getCpuCores() {
        return cpuCores;
    }

    public void setCpuCores(Integer cpuCores) {
        this.cpuCores = cpuCores;
    }

    public Integer getMemSize() {
        return memSize;
    }

    public void setMemSize(Integer memSize) {
        this.memSize = memSize;
    }

    public Float getUpstreamBandwidth() {
        return upstreamBandwidth;
    }

    public void setUpstreamBandwidth(Float upstreamBandwidth) {
        this.upstreamBandwidth = upstreamBandwidth;
    }

    public Float getDownstreamBandwidth() {
        return downstreamBandwidth;
    }

    public void setDownstreamBandwidth(Float downstreamBandwidth) {
        this.downstreamBandwidth = downstreamBandwidth;
    }

}

